package com.dubbo.demo.spi;

import org.apache.dubbo.common.extension.ExtensionLoader;
import org.junit.Test;

/**
 * @author Carlos
 * @version 1.0
 * @Description TODO
 * @date 2021/11/10 22:44
 **/
public class SPITest {

    @Test
    public void test01() {
        ExtensionLoader<ICluster> loader = ExtensionLoader.getExtensionLoader(ICluster.class);

        ICluster redis = loader.getExtension("redis");
        redis.register();

        ICluster zookeeper = loader.getExtension("zookeeper");
        zookeeper.register();
    }

}
